package com.zhixi.datasource;


/**
 * @author zhixi
 * 存储数据源的key，使用线程安全方式进行添加数据源
 */
public class DataSourceContextHolder {

    public static ThreadLocal<String> key = new ThreadLocal<>();

    public static void setKey(String key) {
        DataSourceContextHolder.key.set(key);
    }

    public static String getKey() {
        return key.get();
    }

    public static void clearKey() {
        key.remove();
    }
}
